function db (sql, callback ) {
  const mysql      = require('mysql');
  const connection = mysql.createConnection({
    host     : 'localhost',
    user     : 'root',
    password : '',
    database : 'labsensorsystem'
  });
   
  connection.connect();
   
  connection.query(sql, callback);
   
  connection.end();
}

module.exports = db;